package com.gitee.wsl.ext.list

fun <T> List<T>.eachCount() =
    groupBy { it }.mapValues { it.value.size }
// This is tested to be faster than the implementation below in some scenarios.
//groupingBy { it }.eachCount()